secret1 = ('123')
temp = input('请输入密码\n')
secret2 = str(temp)
i=1
while (secret1 != secret2) or (i<3):
    if secret1 == secret2:
        print('密码正确')
        break
    else:
        if i < 3:
            if '*' in secret2:
                temp = input('请输入密码\n')
                secret2 = str(temp)
            else:
                print('密码错误')
                temp = input('请输入密码\n')
                secret2 = str(temp)
                i+=1              
        else:
            print('密码错误')
            print('次数用完')
            break
print('结束')
